<?php
include_once('resize.class.php');

try {
    $obj = new Resize("y:\5mb.jpg");
    $obj->setNewImage("y:\temp\resized.jpg");
    $obj->setWaterMarkImage("resized2.gif");
    $obj->setWaterMarkOpacity(100);
    $obj->setWaterMarkPosition('topCenter');
    $obj->setProportionalFlag('H');
    $obj->setProportional(1);
    $obj->setDegrees(90);
    $obj->setNewSize(500, 500);
    $obj->make();
}
catch (Exception $e) {
    die($e);
}
?>